﻿@{
    ViewBag.Title = "creat";
    <script src="~/Scripts/jquery-1.7.1.min.js"></script>
    <script src="~/Content/ckeditor/ckeditor.js"></script>
    <script src="~/Content/ckfinder/ckfinder.js"></script>
}



<h2>Them Mon Hoc</h2>
@using(Html.BeginForm())
{
<table>
    <tr>
        <td>Ma Mon:</td>
        <td>@Html.TextBox("txtmamon")</td>
    </tr>
       <tr>
        <td>Ten Mon</td>
        <td>@Html.TextBox("txttenmon")</td>
    </tr>
       <tr>
        <td>So Tiet</td>
        <td>@Html.TextBox("txtsotiet")</td>
              </tr><tr>
        <td>Thu Tu</td>
        <td>@Html.TextBox("txtthutu")</td>
    </tr>
    <tr>
        <td>Quản Lí Ảnh</td>
        <td><input id="images" name="images" type="text" /><input id="Browser" type="button" value="Browser images" /></td>
    </tr>
    <tr>
        <td>Nội Dung</td>
        <td><textarea id="txtDetail"></textarea></td>
    </tr>
              <tr>
        <td></td>
        <td><input type="submit" name="Them" value="Them"></td>
    </tr>
    
</table>
}
<script language="javascript" type="text/javascript">
    $(function(){
        $("#Browser").click(function()
        {
            var ckfiner = new CKFinder();
            ckfiner.selectActionFunction = function (fileUrl) {
                $("#images").val(fileUrl);
            };
            ckfiner.popup();
            });
    });

</script>
<script language="javascript" type="text/javascript">

    var ckeditor;
    function createEditor(languageCode, id)
    {
        var editor = CKEDITOR.replace(id, { language: languageCode });
    }
    $(function () {

        createEditor("vi",'txtDetail')
    });
</script>
